package com.gopay.common.domain.acps;

/**
 * 支付密码状态
 * 
 * @PayPasswordStatus.java
 * @author zhanglei
 * @2013-1-21 上午11:03:52 www.gopay.com.cn Inc.All rights reserved.
 */
public enum PayPasswordStatus {
    // 请不要调整各变量的先后顺序！！！持久化值依ordinal定的
    /** 0 - 正常 */
    NORMAL,
    /** 1 - 当日锁定 */
    LOCK_ONEDAY,
    /** 2 - 永久锁定 */
    LOCK_PERMANENT;

    public static PayPasswordStatus get(int status) {
        switch (status) {
        case 0:
            return PayPasswordStatus.NORMAL;
        case 1:
            return PayPasswordStatus.LOCK_ONEDAY;
        case 2:
            return PayPasswordStatus.LOCK_PERMANENT;
        default:
            throw new RuntimeException("wrong PayPasswordStatus index! status:" + status);
        }
    }
}
